home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / gencodee.lha / E / sources / GUIFile.e < prev    next >
Text File  |  1995-09-12  |  31KB  |  1,259 lines

  1. OPT MODULE
  2. OPT PREPROCESS
  3.  
  4.  
  5. ->/////////////////////////////////////////////////////////////////////////////
  6. ->//////////////////////////////////////////////////////////// MODULE ... /////
  7. ->/////////////////////////////////////////////////////////////////////////////
  8. MODULE 'muibuilder' , 'libraries/muibuilder'
  9.  
  10. MODULE '*Variable'
  11. MODULE '*AuxProcs'
  12.  
  13.  
  14. ->/////////////////////////////////////////////////////////////////////////////
  15. ->//////////////////////////////////////////////// RAISE ... IF ... = ... /////
  16. ->/////////////////////////////////////////////////////////////////////////////
  17. RAISE    "OPEN"    IF    Open()        =    NIL    ,
  18.         "OUT"    IF    Fputs()        =    -1    ,
  19.         "OUT"    IF    FputC()        =    -1    ,
  20.         "MEM"    IF    String()    =    NIL
  21.  
  22.  
  23. ->/////////////////////////////////////////////////////////////////////////////
  24. ->//////////////////////////////////////////////////////////// OBJECT ... /////
  25. ->/////////////////////////////////////////////////////////////////////////////
  26. EXPORT    OBJECT gui_file
  27.             PRIVATE
  28.                 file                :    LONG
  29.                 number_vars            :    LONG
  30.                 vars                :    PTR TO variable
  31.                 ident_length_max    :    LONG
  32.                 hook_funcs            :    LONG
  33.                 main_object_ident    :    PTR TO CHAR
  34.         ENDOBJECT
  35.  
  36.  
  37. ->/////////////////////////////////////////////////////////////////////////////
  38. ->///////////////////////////////////////////////////////////// PROC open /////
  39. ->/////////////////////////////////////////////////////////////////////////////
  40. PROC open( filename : PTR TO CHAR , number_vars , vars : PTR TO variable , ident_length_max ) OF gui_file
  41.  
  42.     DEF i
  43.  
  44.     self.file := Open( filename , NEWFILE )
  45.     self.number_vars := number_vars
  46.     self.vars := vars
  47.     self.ident_length_max := ident_length_max
  48.     self.main_object_ident := vars[ 0 ].ident
  49.     self.hook_funcs := FALSE
  50.  
  51.     FOR i := 0 TO ( number_vars - 1 ) DO IF vars[ i ].type = TYPEVAR_HOOK THEN self.hook_funcs := TRUE
  52.  
  53. ENDPROC
  54.  
  55.  
  56. ->/////////////////////////////////////////////////////////////////////////////
  57. ->//////////////////////////////////////////////////////////// PROC close /////
  58. ->/////////////////////////////////////////////////////////////////////////////
  59. PROC close() OF gui_file
  60.  
  61.     IF self.file THEN Close( self.file )
  62.  
  63. ENDPROC
  64.  
  65.  
  66. ->/////////////////////////////////////////////////////////////////////////////
  67. ->/////////////////////////////////////////////////////// PROC put_header /////
  68. ->/////////////////////////////////////////////////////////////////////////////
  69. PROC put_header( application , locale ) OF gui_file
  70.  
  71.     Fputs( self.file ,
  72.         'OPT MODULE\n'                                                                        +
  73.         'OPT PREPROCESS\n\n\n'                                                                +
  74.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  75.         '->//////////////////////////////////////////////////////////// MODULE ... /////\n'    +
  76.         '->/////////////////////////////////////////////////////////////////////////////\n' +
  77.         'MODULE ''muimaster'' , ''libraries/mui''\n'                                        +
  78.         'MODULE ''tools/boopsi'' , ''libraries/gadtools''\n'                                                            +
  79.         'MODULE ''utility/tagitem'''                                                        )
  80.  
  81.     Fputs( self.file , IF ( self.hook_funcs OR application ) THEN ' , ''utility/hooks''\n\n' ELSE '\n\n' )
  82.  
  83.     IF locale THEN Fputs( self.file , 'MODULE ''*Locale''\n\n\n' ) ELSE FputC( self.file , "\n" )
  84.  
  85. ENDPROC
  86.  
  87.  
  88. ->/////////////////////////////////////////////////////////////////////////////
  89. ->////////////////////////////////////////////////// PROC put_aux_objects /////
  90. ->/////////////////////////////////////////////////////////////////////////////
  91. PROC put_aux_objects( environment , application ) OF gui_file
  92.  
  93.     DEF i
  94.  
  95.     IF environment
  96.  
  97.         Fputs( self.file ,
  98.             '->/////////////////////////////////////////////////////////////////////////////\n'    +
  99.             '->//////////////////////////////////////////////////////////// OBJECT ... /////\n'    +
  100.             '->/////////////////////////////////////////////////////////////////////////////\n' )
  101.  
  102.         IF application THEN    Fputs( self.file ,
  103.                                 'EXPORT OBJECT app_arexx\n'                +
  104.                                 '\tcommands :\tPTR TO mui_command\n'    +
  105.                                 '\terror    :\thook\n'                    +
  106.                                 'ENDOBJECT\n\n'                            )
  107.  
  108.     ENDIF
  109.  
  110.     IF self.hook_funcs
  111.  
  112.         IF environment
  113.  
  114.             Fputs( self.file , 'EXPORT OBJECT ' )
  115.             Fputs( self.file , self.main_object_ident )
  116.             Fputs( self.file , '_display\n' )
  117.  
  118.         ENDIF
  119.  
  120.         FOR i := 0 TO ( self.number_vars - 1 )
  121.  
  122.             IF self.vars[ i ].type = TYPEVAR_HOOK
  123.  
  124.                 FputC( self.file , "\t" )
  125.                 Fputs( self.file , self.vars[ i ].ident )
  126.                 indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  127.                 Fputs( self.file , ' :\thook\n' )
  128.  
  129.             ENDIF
  130.  
  131.         ENDFOR
  132.  
  133.         IF environment THEN Fputs( self.file , 'ENDOBJECT\n\n' ) ELSE FputC( self.file , "\n" )
  134.  
  135.     ENDIF
  136.  
  137. ENDPROC
  138.  
  139.  
  140. ->/////////////////////////////////////////////////////////////////////////////
  141. ->////////////////////////////////////////////////// PROC put_main_object /////
  142. ->/////////////////////////////////////////////////////////////////////////////
  143. PROC put_main_object( environment ) OF gui_file
  144.  
  145.     DEF i
  146.  
  147.     IF environment
  148.  
  149.         Fputs( self.file , 'EXPORT OBJECT ' )
  150.         Fputs( self.file , self.main_object_ident )
  151.         Fputs( self.file , '_obj\n' )
  152.  
  153.     ENDIF
  154.  
  155.     FOR i := 0 TO ( self.number_vars - 1 )
  156.  
  157.         IF self.vars[ i ].type = TYPEVAR_PTR
  158.  
  159.             FputC( self.file , "\t" )
  160.             Fputs( self.file , self.vars[ i ].ident )
  161.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  162.             Fputs( self.file , ' :\tPTR TO LONG\n' )
  163.  
  164.         ENDIF
  165.  
  166.     ENDFOR
  167.  
  168.     FOR i := 0 TO ( self.number_vars - 1 )
  169.  
  170.         IF ( self.vars[ i ].type = TYPEVAR_INT ) AND ( self.vars[ i ].type = TYPEVAR_BOOL )
  171.  
  172.             FputC( self.file , "\t" )
  173.             Fputs( self.file , self.vars[ i ].ident )
  174.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  175.             Fputs( self.file , ' :\tLONG\n' )
  176.  
  177.         ENDIF
  178.  
  179.     ENDFOR
  180.  
  181.     FOR i := 0 TO ( self.number_vars - 1 )
  182.  
  183.         IF self.vars[ i ].type = TYPEVAR_STRING
  184.  
  185.             FputC( self.file , "\t" )
  186.             Fputs( self.file , self.vars[ i ].ident )
  187.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  188.             Fputs( self.file , ' :\tPTR TO CHAR\n' )
  189.  
  190.         ENDIF
  191.  
  192.     ENDFOR
  193.  
  194.     FOR i := 0 TO ( self.number_vars - 1 )
  195.  
  196.         IF self.vars[ i ].type = TYPEVAR_TABSTRING
  197.  
  198.             FputC( self.file , "\t" )
  199.             Fputs( self.file , self.vars[ i ].ident )
  200.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  201.             Fputs( self.file , ' :\tPTR TO LONG\n' )
  202.  
  203.         ENDIF
  204.  
  205.     ENDFOR
  206.  
  207.     Fputs( self.file , IF environment THEN 'ENDOBJECT\n\n\n' ELSE '\n\n' )
  208.  
  209. ENDPROC
  210.  
  211.  
  212. ->/////////////////////////////////////////////////////////////////////////////
  213. ->//////////////////////////////////////////////////// PROC put_constants /////
  214. ->/////////////////////////////////////////////////////////////////////////////
  215. PROC put_constants( environment ) OF gui_file
  216.  
  217.     DEF i , first_constant = TRUE , previous_ident : PTR TO CHAR , offset = 0
  218.  
  219.     FOR i := 0 TO ( self.number_vars - 1 )
  220.  
  221.         IF self.vars[ i ].type = TYPEVAR_IDENT
  222.  
  223.             IF first_constant
  224.  
  225.                 IF environment THEN    Fputs( self.file ,
  226.                                         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  227.                                         '->/////////////////////////////////////////////////////// CONST ... = ... /////\n'    +
  228.                                         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  229.                                         'EXPORT ENUM\n'                                                                        )
  230.  
  231.                 FputC( self.file , "\t" )
  232.                 Fputs( self.file , self.vars[ i ].ident )
  233.                 Fputs( self.file , ' = 1' )
  234.                 previous_ident := self.vars[ i ].ident
  235.                 first_constant := FALSE
  236.  
  237.             ELSE
  238.  
  239.                 indent_defs( self.file , previous_ident , self.ident_length_max + offset )
  240.                 Fputs( self.file , ' ,\n\t' )
  241.                 Fputs( self.file , self.vars[ i ].ident )
  242.                 offset := 4
  243.                 previous_ident := self.vars[ i ].ident
  244.  
  245.             ENDIF
  246.  
  247.         ENDIF
  248.  
  249.     ENDFOR
  250.  
  251.     IF first_constant = FALSE THEN Fputs( self.file , '\n\n\n' )
  252.  
  253. ENDPROC
  254.  
  255.  
  256. ->/////////////////////////////////////////////////////////////////////////////
  257. ->////////////////////////////////////////////////// PROC put_global_vars /////
  258. ->/////////////////////////////////////////////////////////////////////////////
  259. PROC put_global_vars( environment , locale , catalog_name : PTR TO CHAR ) OF gui_file
  260.  
  261.     DEF i , first_global_var = TRUE
  262.  
  263.     FOR i := 0 TO ( self.number_vars - 1 )
  264.  
  265.         IF self.vars[ i ].type = TYPEVAR_EXTERNAL
  266.  
  267.             IF first_global_var
  268.  
  269.                 IF environment THEN    Fputs( self.file ,
  270.                                         '->/////////////////////////////////////////////////////////////////////////////\n' +
  271.                                         '->///////////////////////////////////////////////////////// DEF ... = ... /////\n' +
  272.                                         '->/////////////////////////////////////////////////////////////////////////////\n'    )
  273.  
  274.                 first_global_var := FALSE
  275.  
  276.             ENDIF
  277.  
  278.             Fputs( self.file , 'EXPORT DEF ' )
  279.             Fputs( self.file , self.vars[ i ].ident )
  280.             FputC( self.file , "\n" )
  281.  
  282.         ENDIF
  283.  
  284.     ENDFOR
  285.  
  286.     IF locale
  287.  
  288.         IF first_global_var
  289.  
  290.             IF environment THEN    Fputs( self.file ,
  291.                                     '->/////////////////////////////////////////////////////////////////////////////\n' +
  292.                                     '->///////////////////////////////////////////////////////// DEF ... = ... /////\n' +
  293.                                     '->/////////////////////////////////////////////////////////////////////////////\n'    )
  294.  
  295.             first_global_var := FALSE
  296.  
  297.         ELSE
  298.  
  299.             FputC( self.file , "\n" )
  300.  
  301.         ENDIF
  302.  
  303.         Fputs( self.file , 'EXPORT DEF cat : PTR TO ' )
  304.         Fputs( self.file ,  catalog_name )
  305.         FputC( self.file , "\n" )
  306.  
  307.     ENDIF
  308.  
  309.     IF first_global_var = FALSE THEN Fputs( self.file , '\n\n' )
  310.  
  311. ENDPROC
  312.  
  313.  
  314. ->/////////////////////////////////////////////////////////////////////////////
  315. ->/////////////////////////////////////////// PROC put_create_declaration /////
  316. ->/////////////////////////////////////////////////////////////////////////////
  317. PROC put_create_declaration( application ) OF gui_file
  318.  
  319.     Fputs( self.file ,
  320.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  321.         '->/////////////////////////////////////////////////////////// PROC create /////\n'    +
  322.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  323.         'PROC create('                                                                        )
  324.  
  325.     IF application
  326.  
  327.         IF self.hook_funcs
  328.  
  329.             Fputs( self.file , ' display : PTR TO ' )
  330.             Fputs( self.file , self.main_object_ident )
  331.             Fputs( self.file , '_display ,\n            ' )
  332.  
  333.         ENDIF
  334.  
  335.         Fputs( self.file ,
  336.             ' icon  = NIL ,\n'                                    +
  337.             '             arexx = NIL : PTR TO app_arexx ,\n'    +
  338.             '             menu  = NIL '                            )
  339.  
  340.     ELSE
  341.  
  342.         IF self.hook_funcs
  343.  
  344.             Fputs( self.file , ' display : PTR TO ' )
  345.             Fputs( self.file , self.main_object_ident )
  346.             Fputs( self.file , '_display ' )
  347.  
  348.         ENDIF
  349.  
  350.     ENDIF
  351.  
  352.     Fputs( self.file , ') OF ' )
  353.     Fputs( self.file , self.main_object_ident )
  354.     Fputs( self.file , '_obj\n\n' )
  355.  
  356. ENDPROC
  357.  
  358.  
  359. ->/////////////////////////////////////////////////////////////////////////////
  360. ->//////////////////////////////////////////// PROC put_create_local_defs /////
  361. ->/////////////////////////////////////////////////////////////////////////////
  362. PROC put_create_local_defs() OF gui_file
  363.  
  364.     DEF i , defs_string[ 70 ] : STRING , local_vars = FALSE
  365.  
  366.     FOR i := 0 TO ( self.number_vars - 1 )
  367.  
  368.         IF self.vars[ i ].type = TYPEVAR_LOCAL_PTR
  369.  
  370.             local_vars := TRUE
  371.  
  372.             IF ( EstrLen( defs_string ) + StrLen ( self.vars[ i ].ident ) ) <= 57
  373.  
  374.                 IF EstrLen( defs_string ) <> 0 THEN StrAdd( defs_string , ' , ' )
  375.                 StrAdd( defs_string , self.vars[ i ].ident )
  376.  
  377.             ELSE
  378.  
  379.                 Fputs( self.file, '\tDEF ' )
  380.                 Fputs( self.file, defs_string )
  381.                 FputC( self.file , "\n" )
  382.                 SetStr( defs_string , 0 )
  383.                 StrAdd( defs_string , self.vars[ i ].ident )
  384.  
  385.             ENDIF
  386.  
  387.         ENDIF
  388.             
  389.     ENDFOR
  390.  
  391.     IF EstrLen( defs_string ) <> 0
  392.  
  393.         Fputs( self.file , '\tDEF ' )
  394.         Fputs( self.file , defs_string )
  395.         FputC( self.file , "\n" )
  396.  
  397.     ENDIF
  398.  
  399.     IF local_vars THEN FputC( self.file , "\n" )
  400.  
  401. ENDPROC
  402.  
  403.  
  404. ->/////////////////////////////////////////////////////////////////////////////
  405. ->/////////////////////////////////////// PROC put_create_initialisations /////
  406. ->/////////////////////////////////////////////////////////////////////////////
  407. PROC put_create_initialisations( locale , getstring_func : PTR TO CHAR ) OF gui_file
  408.  
  409.     DEF i , j , initialisations = FALSE
  410.     DEF strptr : PTR TO CHAR
  411.  
  412.     FOR i := 0 TO ( self.number_vars - 1 )
  413.  
  414.         IF self.vars[ i ].type = TYPEVAR_STRING
  415.  
  416.             initialisations := TRUE
  417.  
  418.             Fputs( self.file , '\tself.' )
  419.             Fputs( self.file , self.vars[ i ].ident )
  420.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  421.             Fputs( self.file , ' := ' )
  422.  
  423.             IF Char( self.vars[ i ].init ) <> 0
  424.  
  425.                 IF locale
  426.  
  427.                     Fputs( self.file , 'cat.' )
  428.                     Fputs( self.file , self.vars[ i ].init )
  429.                     FputC( self.file , "." )
  430.                     Fputs( self.file , getstring_func )
  431.                     Fputs( self.file , '()\n' )
  432.  
  433.                 ELSE
  434.  
  435.                     Fputs( self.file , string_convert( self.vars[ i ].init ) )
  436.                     FputC( self.file , "\n" )
  437.  
  438.                 ENDIF
  439.  
  440.             ELSE
  441.  
  442.                 Fputs( self.file , 'NIL\n' )
  443.  
  444.             ENDIF
  445.  
  446.         ENDIF
  447.  
  448.     ENDFOR
  449.  
  450.     FOR i := 0 TO ( self.number_vars - 1 )
  451.  
  452.         IF self.vars[ i ].type = TYPEVAR_TABSTRING
  453.  
  454.             initialisations := TRUE
  455.  
  456.             Fputs( self.file , '\tself.' )
  457.             Fputs( self.file , self.vars[ i ].ident )
  458.             indent_defs( self.file , self.vars[ i ].ident , self.ident_length_max )
  459.             Fputs( self.file , ' := [\n' )
  460.             strptr := self.vars[ i ].init
  461.  
  462.             FOR j := 1 TO self.vars[ i ].size
  463.  
  464.                 Fputs( self.file , '\t\t' )
  465.  
  466.                 IF locale
  467.  
  468.                     Fputs( self.file , 'cat.' )
  469.                     Fputs( self.file , strptr )
  470.                     FputC( self.file , "." )
  471.                     Fputs( self.file , getstring_func )
  472.                     Fputs( self.file , '() ,\n' )
  473.  
  474.                 ELSE
  475.  
  476.                     Fputs( self.file , string_convert( strptr ) )
  477.                     Fputs( self.file , ' ,\n' )
  478.  
  479.                 ENDIF
  480.  
  481.                 strptr := strptr + StrLen( strptr ) + 1
  482.  
  483.             ENDFOR
  484.  
  485.             Fputs( self.file , '\t\tNIL ]\n' )
  486.  
  487.         ENDIF
  488.  
  489.     ENDFOR
  490.  
  491.     IF initialisations THEN FputC( self.file , "\n" )
  492.  
  493. ENDPROC
  494.  
  495.  
  496. ->/////////////////////////////////////////////////////////////////////////////
  497. ->///////////////////////////////////////////////////////// PROC put_code /////
  498. ->/////////////////////////////////////////////////////////////////////////////
  499. PROC put_code( getstring_func : PTR TO CHAR , muistrings : PTR TO LONG ) OF gui_file
  500.  
  501.     DEF type , code
  502.     DEF indent_level = 1 , func_level = 0
  503.     DEF return = TRUE , objfunction = FALSE , inobj = FALSE
  504.     DEF makeobject = 0
  505.  
  506.     Mb_GetNextCode( {type} , {code} )
  507.  
  508.     WHILE type <> -1
  509.  
  510.         SELECT type
  511.  
  512.             CASE TC_CREATEOBJ
  513.  
  514.                 indent_code( self.file , indent_level , return )
  515.                 Fputs( self.file , muistrings[ Val( code ) ] )
  516.                 Fputs( self.file , ' ,\n' )
  517.                 INC indent_level
  518.                 return := TRUE
  519.                 inobj := TRUE
  520.  
  521.                 IF Val( code ) = 113
  522.  
  523.                     indent_code( self.file , indent_level , return )
  524.                     Fputs( self.file , '( IF icon THEN MUIA_Application_DiskObject ELSE TAG_IGNORE ) , icon ,\n' )
  525.  
  526.                     indent_code( self.file , indent_level , return )
  527.                     Fputs( self.file , '( IF arexx THEN MUIA_Application_Commands ELSE TAG_IGNORE ) , ( IF arexx THEN arexx.commands ELSE NIL ) ,\n' )
  528.  
  529.                     indent_code( self.file , indent_level , return )
  530.                     Fputs( self.file , '( IF arexx THEN MUIA_Application_RexxHook ELSE TAG_IGNORE ) , ( IF arexx THEN arexx.error ELSE NIL ) ,\n' )
  531.  
  532.                     indent_code( self.file , indent_level , return )
  533.                     Fputs( self.file , '( IF menu THEN MUIA_Application_Menu ELSE TAG_IGNORE ) , menu ,\n' )
  534.  
  535.                 ENDIF
  536.  
  537.                 Mb_GetNextCode( {type} , {code} )
  538.  
  539.             CASE TC_ATTRIBUT
  540.  
  541.                 indent_code( self.file , indent_level , return )
  542.                 Fputs( self.file , muistrings[ Val( code ) ] )
  543.                 Fputs( self.file , ' , ')
  544.                 return := FALSE
  545.                 Mb_GetNextCode( {type} , {code} )
  546.  
  547.             CASE TC_END
  548.  
  549.                 DEC indent_level
  550.                 indent_code( self.file , indent_level , return )
  551.                 Fputs( self.file , muistrings[ Val( code ) ] )
  552.                 Fputs( self.file , '\n\n')
  553.                 inobj := FALSE
  554.                 return := TRUE
  555.                 Mb_GetNextCode( {type} , {code} )
  556.  
  557.             CASE TC_FUNCTION
  558.  
  559.                 indent_code( self.file , indent_level , return )
  560.  
  561.                 IF Val( code ) = 673
  562.  
  563.                     FputC( self.file , 34 )
  564.                     Mb_GetNextCode( {type} , {code} )
  565.                     Fputs( self.file , code )
  566.                     Mb_GetNextCode( {type} , {code} )
  567.                     Fputs( self.file , code )
  568.                     Mb_GetNextCode( {type} , {code} )
  569.                     Fputs( self.file , code )
  570.                     Mb_GetNextCode( {type} , {code} )
  571.                     Fputs( self.file , code )
  572.                     Mb_GetNextCode( {type} , {code} )
  573.                     Fputs( self.file , '" ,\n' )
  574.  
  575.                     return := TRUE
  576.  
  577.                 ELSE
  578.  
  579.                     INC func_level
  580.                     Fputs( self.file , muistrings[ Val( code ) ] )
  581.                     Fputs( self.file , '( ' )
  582.                     return := FALSE
  583.  
  584.                 ENDIF
  585.  
  586.                 Mb_GetNextCode( {type} , {code} )
  587.  
  588.             CASE TC_MUIARG_FUNCTION        ->    same as TC_FUNCTION
  589.  
  590.                 indent_code( self.file , indent_level , return )
  591.                 INC func_level
  592.                 Fputs( self.file , muistrings[ Val( code ) ] )
  593.                 Fputs( self.file , '( ' )
  594.                 return := FALSE
  595.                 Mb_GetNextCode( {type} , {code} )
  596.  
  597.             CASE TC_OBJFUNCTION
  598.  
  599.                 indent_code( self.file , indent_level , return )
  600.                 Fputs( self.file , muistrings[ Val( code ) ] )
  601.                 Fputs( self.file , '( ' )
  602.                 INC func_level
  603.                 return := FALSE
  604.                 objfunction := TRUE
  605.                 IF Val( code ) = 750 THEN INC makeobject
  606.                 Mb_GetNextCode( {type} , {code} )
  607.  
  608.             CASE TC_MUIARG_OBJFUNCTION        ->    same as TC_OBJFUNCTION
  609.  
  610.                 indent_code( self.file , indent_level , return )
  611.                 Fputs( self.file , muistrings[ Val( code ) ] )
  612.                 Fputs( self.file , '( ' )
  613.                 INC func_level
  614.                 return := FALSE
  615.                 objfunction := TRUE
  616.                 Mb_GetNextCode( {type} , {code} )
  617.  
  618.             CASE TC_STRING
  619.  
  620.                 indent_code( self.file , indent_level , return )
  621.                 Fputs( self.file , string_convert( code ) )
  622.                 Mb_GetNextCode( {type} , {code} )
  623.  
  624.                 IF func_level > 0
  625.  
  626.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ' )
  627.                     return := FALSE
  628.  
  629.                 ELSE
  630.  
  631.                     Fputs( self.file , ' ,\n' )
  632.                     return := TRUE
  633.  
  634.                 ENDIF
  635.  
  636.             CASE TC_INTEGER
  637.  
  638.                 indent_code( self.file , indent_level , return )
  639.                 Fputs( self.file , code )
  640.                 Mb_GetNextCode( {type} , {code} )
  641.  
  642.                 IF func_level > 0
  643.  
  644.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ' )
  645.                     return := FALSE
  646.  
  647.                 ELSE
  648.  
  649.                     Fputs( self.file , ' ,\n' )
  650.                     return := TRUE
  651.  
  652.                 ENDIF
  653.  
  654.             CASE TC_CHAR
  655.  
  656.                 indent_code( self.file , indent_level , return )
  657.                 FputC( self.file , 34 )
  658.                 Fputs( self.file , code )
  659.                 Mb_GetNextCode( {type} , {code} )
  660.  
  661.                 IF func_level > 0
  662.  
  663.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , '" , ') ELSE FputC( self.file , 34 )
  664.                     return := FALSE
  665.  
  666.                 ELSE
  667.  
  668.                     Fputs( self.file , '" ,\n' )
  669.                     return := TRUE
  670.  
  671.                 ENDIF
  672.  
  673.             CASE TC_VAR_AFFECT
  674.  
  675.                 indent_code( self.file , indent_level , return )
  676.  
  677.                 IF self.vars[ Val( code ) ].type <> TYPEVAR_LOCAL_PTR
  678.  
  679.                     Fputs( self.file , 'self.' )
  680.  
  681.                 ENDIF
  682.  
  683.                 Fputs( self.file , self.vars[ Val( code ) ].ident )
  684.                 Fputs( self.file , ' := ')
  685.                 return := FALSE
  686.                 Mb_GetNextCode( {type} , {code} )
  687.  
  688.             CASE TC_VAR_ARG
  689.  
  690.                 indent_code( self.file , indent_level , return )
  691.  
  692.                 IF self.vars[ Val( code ) ].type <> TYPEVAR_LOCAL_PTR
  693.  
  694.                     Fputs( self.file , 'self.' )
  695.  
  696.                 ENDIF
  697.  
  698.                 Fputs( self.file , self.vars[ Val( code ) ].ident )
  699.                 Mb_GetNextCode( {type} , {code} )
  700.  
  701.                 IF func_level > 0
  702.  
  703.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  704.                     return := FALSE
  705.  
  706.                 ELSE
  707.  
  708.                     Fputs( self.file , ' ,\n')
  709.                     return := TRUE
  710.  
  711.                 ENDIF
  712.  
  713.             CASE TC_OBJ_ARG        ->    same as TC_VAR_ARG
  714.  
  715.                 indent_code( self.file , indent_level , return )
  716.  
  717.                 IF self.vars[ Val( code ) ].type <> TYPEVAR_LOCAL_PTR
  718.  
  719.                     Fputs( self.file , 'self.' )
  720.  
  721.                 ENDIF
  722.  
  723.                 Fputs( self.file , self.vars[ Val( code ) ].ident )
  724.                 Mb_GetNextCode( {type} , {code} )
  725.  
  726.                 IF func_level > 0
  727.  
  728.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  729.                     return := FALSE
  730.  
  731.                 ELSE
  732.  
  733.                     Fputs( self.file , ' ,\n')
  734.                     return := TRUE
  735.  
  736.                 ENDIF
  737.  
  738.             CASE TC_END_FUNCTION
  739.  
  740.                 indent_code( self.file , indent_level , return )
  741.                 DEC func_level
  742.                 Mb_GetNextCode( {type} , {code} )
  743.  
  744.                 IF makeobject
  745.                     Fputs( self.file , ' ]' )
  746.                     makeobject := 0
  747.                 ENDIF
  748.  
  749.                 IF func_level > 0
  750.  
  751.                     Fputs( self.file , ' )' )
  752.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' ,' )
  753.                     return := FALSE
  754.  
  755.                 ELSE
  756.  
  757.                     Fputs( self.file , IF objfunction THEN ' )\n\n' ELSE ' ) ,\n' )
  758.                     objfunction := FALSE
  759.                     return := TRUE
  760.  
  761.                 ENDIF
  762.  
  763.             CASE TC_BOOL
  764.  
  765.                 indent_code( self.file , indent_level , return )
  766.                 Fputs( self.file , IF Char( code ) = "0" THEN 'FALSE' ELSE 'MUI_TRUE')
  767.                 Mb_GetNextCode( {type} , {code} )
  768.  
  769.                 IF func_level > 0
  770.  
  771.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  772.                     return := FALSE
  773.  
  774.                 ELSE
  775.  
  776.                     Fputs( self.file , ' ,\n')
  777.                     return := TRUE
  778.  
  779.                 ENDIF
  780.  
  781.             CASE TC_MUIARG
  782.  
  783.                 indent_code( self.file , indent_level , return )
  784.                 Fputs( self.file , muistrings[ Val( code ) ] )
  785.                 Mb_GetNextCode( {type} , {code} )
  786.  
  787.                 IF func_level > 0
  788.  
  789.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  790.                     IF makeobject = 1
  791.                         Fputs( self.file , '[ ' )
  792.                         INC makeobject
  793.                     ENDIF
  794.                     return := FALSE
  795.  
  796.                 ELSE
  797.  
  798.                     Fputs( self.file , ' ,\n')
  799.                     return := TRUE
  800.  
  801.                 ENDIF
  802.  
  803.             CASE TC_MUIARG_OBJ
  804.  
  805.                 indent_code( self.file , indent_level , return )
  806.                 Fputs( self.file , muistrings[ Val( code ) ] )
  807.                 Mb_GetNextCode( {type} , {code} )
  808.  
  809.                 IF inobj
  810.  
  811.                     Fputs( self.file , ' ,\n' )
  812.                     return := TRUE
  813.  
  814.                 ELSE
  815.  
  816.                     IF func_level > 0
  817.  
  818.                         IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  819.                         return := FALSE
  820.  
  821.                     ELSE
  822.  
  823.                         Fputs( self.file , '\n\n')
  824.                         return := TRUE
  825.  
  826.                     ENDIF
  827.  
  828.                 ENDIF
  829.  
  830.             CASE TC_MUIARG_ATTRIBUT        ->    same as TC_MUIARG_OBJ
  831.  
  832.                 indent_code( self.file , indent_level , return )
  833.                 Fputs( self.file , muistrings[ Val( code ) ] )
  834.                 Mb_GetNextCode( {type} , {code} )
  835.  
  836.                 IF inobj
  837.  
  838.                     Fputs( self.file , ' ,\n' )
  839.                     return := TRUE
  840.  
  841.                 ELSE
  842.  
  843.                     IF func_level > 0
  844.  
  845.                         IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  846.                         return := FALSE
  847.  
  848.                     ELSE
  849.  
  850.                         Fputs( self.file , '\n\n')
  851.                         return := TRUE
  852.  
  853.                     ENDIF
  854.  
  855.                 ENDIF
  856.  
  857.             CASE TC_EXTERNAL_FUNCTION
  858.  
  859.                 indent_code( self.file , indent_level , return )
  860.                 Fputs( self.file , 'display.' )
  861.                 Fputs( self.file , code )
  862.                 Mb_GetNextCode( {type} , {code} )
  863.  
  864.                 IF func_level > 0
  865.  
  866.                     IF type <> TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  867.                     return := FALSE
  868.  
  869.                 ELSE
  870.  
  871.                     Fputs( self.file , ' ,\n')
  872.                     return := TRUE
  873.  
  874.                 ENDIF
  875.  
  876.             CASE TC_LOCALESTRING
  877.  
  878.                 indent_code( self.file , indent_level , return )
  879.                 Fputs( self.file , 'getMBstring( cat.')
  880.                 Fputs( self.file ,  code )
  881.                 FputC( self.file , "." )
  882.                 Fputs( self.file , getstring_func )
  883.                 Fputs( self.file , '() )' )
  884.                 Mb_GetNextCode( {type} , {code} )
  885.  
  886.                 IF func_level > 0
  887.  
  888.                     IF type<>TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  889.                     return := FALSE
  890.  
  891.                 ELSE
  892.  
  893.                     Fputs( self.file , ' ,\n')
  894.                     return := TRUE
  895.  
  896.                 ENDIF
  897.  
  898.             CASE TC_LOCALECHAR
  899.  
  900.                 indent_code( self.file , indent_level , return )
  901.                 Fputs( self.file , 'Char( cat.')
  902.                 Fputs( self.file ,  code )
  903.                 FputC( self.file , "." )
  904.                 Fputs( self.file , getstring_func )
  905.                 Fputs( self.file , '() )')
  906.                 Mb_GetNextCode( {type} , {code} )
  907.  
  908.                 IF func_level > 0
  909.  
  910.                     IF type<>TC_END_FUNCTION THEN Fputs( self.file , ' , ')
  911.                     return := FALSE
  912.  
  913.                 ELSE
  914.  
  915.                     Fputs( self.file , ' ,\n')
  916.                     return := TRUE
  917.  
  918.                 ENDIF
  919.  
  920.         ENDSELECT
  921.  
  922.     ENDWHILE
  923.  
  924. ENDPROC
  925.  
  926.  
  927. ->/////////////////////////////////////////////////////////////////////////////
  928. ->/////////////////////////////////////////////////// PROC put_create_end /////
  929. ->/////////////////////////////////////////////////////////////////////////////
  930. PROC put_create_end() OF gui_file
  931.  
  932.     Fputs( self.file , 'ENDPROC self.' )
  933.     Fputs( self.file , self.main_object_ident )
  934.     Fputs( self.file , '\n\n\n' )
  935.  
  936. ENDPROC
  937.  
  938.  
  939. ->/////////////////////////////////////////////////////////////////////////////
  940. ->/////////////////////////////////////////////// PROC put_dispose_method /////
  941. ->/////////////////////////////////////////////////////////////////////////////
  942. PROC put_dispose_method() OF gui_file
  943.  
  944.     Fputs( self.file ,
  945.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  946.         '->////////////////////////////////////////////////////////// PROC dispose /////\n'    +
  947.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  948.         'PROC dispose() OF '                                                                )
  949.     Fputs( self.file , self.main_object_ident )
  950.     Fputs( self.file , '_obj IS ( IF self.' )
  951.     Fputs( self.file , self.main_object_ident )
  952.     Fputs( self.file , ' THEN Mui_DisposeObject( self.' )
  953.     Fputs( self.file , self.main_object_ident )
  954.     Fputs( self.file , ' ) ELSE NIL )\n\n\n' )
  955.  
  956. ENDPROC
  957.  
  958.  
  959. ->/////////////////////////////////////////////////////////////////////////////
  960. ->/////////////////////////////// PROC put_init_notifications_declaration /////
  961. ->/////////////////////////////////////////////////////////////////////////////
  962. PROC put_init_notifications_declaration() OF gui_file
  963.  
  964.     DEF i , comma = FALSE
  965.  
  966.     Fputs( self.file ,
  967.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  968.         '->/////////////////////////////////////////////// PROC init_notifications /////\n'    +
  969.         '->/////////////////////////////////////////////////////////////////////////////\n'    +
  970.         'PROC init_notifications( '                                                            )
  971.  
  972.     IF self.hook_funcs
  973.  
  974.         Fputs( self.file , 'display : PTR TO ' )
  975.         Fputs( self.file , self.main_object_ident )
  976.         Fputs( self.file , '_display' )
  977.  
  978.         comma := TRUE
  979.  
  980.     ENDIF
  981.  
  982.     FOR i := 0 TO ( self.number_vars - 1 )
  983.  
  984.         IF self.vars[ i ].type = TYPEVAR_EXTERNAL_PTR
  985.  
  986.             IF comma THEN Fputs( self.file , ' , ' ) ELSE comma := TRUE
  987.  
  988.             Fputs( self.file , self.vars[ i ].ident )
  989.  
  990.         ENDIF
  991.  
  992.     ENDFOR
  993.  
  994.     Fputs( self.file , ' ) OF ' )
  995.     Fputs( self.file , self.main_object_ident )
  996.     Fputs( self.file , '_obj\n\n' )
  997.  
  998. ENDPROC
  999.  
  1000.  
  1001. ->/////////////////////////////////////////////////////////////////////////////
  1002. ->//////////////////////////////////////////////// PROC put_notifications /////
  1003. ->/////////////////////////////////////////////////////////////////////////////
  1004. PROC put_notifications( muistrings : PTR TO LONG , getstring_func : PTR TO CHAR ) OF gui_file
  1005.  
  1006.     DEF type , code , indent = FALSE , set_func = FALSE
  1007.  
  1008.     Mb_GetNextNotify( {type} , {code} )
  1009.  
  1010.     WHILE ( type <> -1 )
  1011.  
  1012.         IF indent THEN Fputs( self.file , '\t\t' )
  1013.  
  1014.         SELECT type
  1015.  
  1016.             CASE TC_BEGIN_NOTIFICATION
  1017.  
  1018.                 Fputs( self.file , '\tdomethod( self.' )
  1019.                 Fputs( self.file , self.vars[ Val( code ) ].ident )
  1020.                 Fputs( self.file , ' , [\n' )
  1021.                 indent := TRUE
  1022.                 Mb_GetNextNotify( {type} , {code} )
  1023.  
  1024.             CASE TC_END_NOTIFICATION
  1025.  
  1026.                 Fputs( self.file , ' ] )\n\n' )
  1027.                 indent := FALSE
  1028.                 Mb_GetNextNotify( {type} , {code} )
  1029.  
  1030.             CASE TC_FUNCTION
  1031.  
  1032.                 FputC( self.file , "\t" )
  1033.                 Fputs( self.file , muistrings[ Val( code ) ] )
  1034.                 Fputs( self.file , '( ' )
  1035.                 indent := FALSE
  1036.                 IF Val( code ) = 203 /* set function */ THEN set_func := TRUE
  1037.                 Mb_GetNextNotify( {type} , {code} )
  1038.  
  1039.             CASE TC_END_FUNCTION
  1040.  
  1041.                 Fputs( self.file , ' )\n\n' )
  1042.                 indent := FALSE
  1043.                 set_func := FALSE
  1044.                 Mb_GetNextNotify( {type} , {code} )
  1045.  
  1046.             CASE TC_STRING
  1047.  
  1048.                 Fputs( self.file , string_convert( code ) )
  1049.                 Mb_GetNextNotify( {type} , {code} )
  1050.  
  1051.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1052.  
  1053.                     indent := TRUE
  1054.                     Fputs( self.file , ' ,\n' )
  1055.  
  1056.                 ELSE
  1057.  
  1058.                     indent := FALSE
  1059.  
  1060.                 ENDIF
  1061.  
  1062.             CASE TC_LOCALESTRING
  1063.  
  1064.                 Fputs( self.file , 'getMBstring( cat.')
  1065.                 Fputs( self.file ,  code )
  1066.                 FputC( self.file , "." )
  1067.                 Fputs( self.file , getstring_func )
  1068.                 Fputs( self.file , '() )' )
  1069.                 Mb_GetNextNotify( {type} , {code} )
  1070.  
  1071.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1072.  
  1073.                     indent := TRUE
  1074.                     Fputs( self.file , ' ,\n' )
  1075.  
  1076.                 ELSE
  1077.  
  1078.                     indent := FALSE
  1079.  
  1080.                 ENDIF
  1081.  
  1082.             CASE TC_INTEGER
  1083.  
  1084.                 Fputs( self.file , code )
  1085.                 Mb_GetNextNotify( {type} , {code} )
  1086.  
  1087.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1088.  
  1089.                     indent := TRUE
  1090.                     Fputs( self.file , ' ,\n' )
  1091.  
  1092.                 ELSE
  1093.  
  1094.                     indent := FALSE
  1095.  
  1096.                 ENDIF
  1097.  
  1098.             CASE TC_CHAR
  1099.  
  1100.                 FputC( self.file , 34)
  1101.                 Fputs( self.file , code )
  1102.                 FputC( self.file , 34)
  1103.                 Mb_GetNextNotify( {type} , {code} )
  1104.  
  1105.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1106.  
  1107.                     indent := TRUE
  1108.                     Fputs( self.file , ' ,\n' )
  1109.  
  1110.                 ELSE
  1111.  
  1112.                     indent := FALSE
  1113.  
  1114.                 ENDIF
  1115.  
  1116.             CASE TC_BOOL
  1117.  
  1118.                 Fputs( self.file , IF Char( code ) = "0" THEN 'FALSE' ELSE 'MUI_TRUE')
  1119.                 Mb_GetNextNotify( {type} , {code} )
  1120.  
  1121.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1122.  
  1123.                     indent := TRUE
  1124.                     Fputs( self.file , ' ,\n' )
  1125.  
  1126.                 ELSE
  1127.  
  1128.                     indent := FALSE
  1129.  
  1130.                 ENDIF
  1131.  
  1132.             CASE TC_VAR_ARG
  1133.  
  1134.                 IF self.vars[ Val( code ) ].type <> TYPEVAR_EXTERNAL_PTR THEN Fputs( self.file , 'self.' )
  1135.                 Fputs( self.file , self.vars[ Val( code ) ].ident )
  1136.                 Mb_GetNextNotify( {type} , {code} )
  1137.  
  1138.                 IF set_func
  1139.  
  1140.                     Fputs( self.file , ' ,' )
  1141.                     indent := FALSE
  1142.  
  1143.                 ELSEIF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1144.  
  1145.                     Fputs( self.file , ' ,\n' )
  1146.                     indent := TRUE
  1147.  
  1148.                 ELSE
  1149.  
  1150.                     indent := FALSE
  1151.  
  1152.                 ENDIF
  1153.  
  1154.             CASE TC_MUIARG
  1155.  
  1156.                 Fputs( self.file , muistrings[ Val( code ) ] )
  1157.                 indent := FALSE
  1158.                 Mb_GetNextNotify( {type} , {code} )
  1159.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION ) THEN Fputs( self.file , ' , ' )
  1160.  
  1161.             CASE TC_MUIARG_OBJ        ->    same as TC_MUIARG
  1162.  
  1163.                 Fputs( self.file , muistrings[ Val( code ) ] )
  1164.                 indent := FALSE
  1165.                 Mb_GetNextNotify( {type} , {code} )
  1166.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION ) THEN Fputs( self.file , ' , ' )
  1167.  
  1168.             CASE TC_MUIARG_ATTRIBUT
  1169.  
  1170.                 Fputs( self.file , muistrings[ Val( code ) ] )
  1171.                 Mb_GetNextNotify( {type} , {code} )
  1172.  
  1173.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1174.  
  1175.                     indent := TRUE
  1176.                     Fputs( self.file , ' ,\n' )
  1177.  
  1178.                 ELSE
  1179.  
  1180.                     indent := FALSE
  1181.  
  1182.                 ENDIF
  1183.  
  1184.             CASE TC_EXTERNAL_CONSTANT
  1185.  
  1186.                 Fputs( self.file , code )
  1187.                 Mb_GetNextNotify( {type} , {code} )
  1188.  
  1189.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1190.  
  1191.                     indent := TRUE
  1192.                     Fputs( self.file , ' ,\n' )
  1193.  
  1194.                 ELSE
  1195.  
  1196.                     indent := FALSE
  1197.  
  1198.                 ENDIF
  1199.  
  1200.             CASE TC_EXTERNAL_FUNCTION
  1201.  
  1202.                 Fputs( self.file , 'display.' )
  1203.                 Fputs( self.file , code )
  1204.  
  1205.                 Mb_GetNextNotify( {type} , {code} )
  1206.  
  1207.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1208.  
  1209.                     indent := TRUE
  1210.                     Fputs( self.file , ' ,\n' )
  1211.  
  1212.                 ELSE
  1213.  
  1214.                     indent := FALSE
  1215.  
  1216.                 ENDIF
  1217.  
  1218.             CASE TC_EXTERNAL_VARIABLE
  1219.  
  1220.                 Fputs( self.file , code )
  1221.                 Mb_GetNextNotify( {type} , {code} )
  1222.  
  1223.                 IF ( type <> TC_END_FUNCTION ) AND ( type <> TC_END_NOTIFICATION )
  1224.  
  1225.                     indent := TRUE
  1226.                     Fputs( self.file , ' ,\n' )
  1227.  
  1228.                 ELSE
  1229.  
  1230.                     indent := FALSE
  1231.  
  1232.                 ENDIF
  1233.  
  1234.         ENDSELECT
  1235.  
  1236.     ENDWHILE
  1237.  
  1238. ENDPROC
  1239.  
  1240.  
  1241. ->/////////////////////////////////////////////////////////////////////////////
  1242. ->/////////////////////////////////////// PROC put_init_notifications_end /////
  1243. ->/////////////////////////////////////////////////////////////////////////////
  1244. PROC put_init_notifications_end() OF gui_file IS Fputs( self.file , 'ENDPROC\n\n\n' )
  1245.  
  1246.  
  1247. ->/////////////////////////////////////////////////////////////////////////////
  1248. ->//////////////////////////////////////////////////// PROC put_aux_funcs /////
  1249. ->/////////////////////////////////////////////////////////////////////////////
  1250. PROC put_aux_funcs() OF gui_file
  1251.  
  1252.     Fputs( self.file ,
  1253.         '->/////////////////////////////////////////////////////////////////////////////\n'                                                        +
  1254.         '->////////////////////////////////////////////////////// PROC getMBstring /////\n'                                                        +
  1255.         '->/////////////////////////////////////////////////////////////////////////////\n'                                                        +
  1256.         'PROC getMBstring( local_string : PTR TO CHAR ) RETURN ( IF local_string[ 1 ] = "\\0" THEN ( local_string + 2 ) ELSE local_string )\n'    )
  1257.  
  1258. ENDPROC
  1259.